<?php

// Create page object
$feedback_grid = new cfeedback_grid();
$MasterPage =& $Page;
$Page =& $feedback_grid;

// Page init
$feedback_grid->Page_Init();

// Page main
$feedback_grid->Page_Main();
?>
<?php if ($feedback->Export == "") { ?>
<script type="text/javascript">
<!--

// Create page object
var feedback_grid = new ew_Page("feedback_grid");

// page properties
feedback_grid.PageID = "grid"; // page ID
feedback_grid.FormID = "ffeedbackgrid"; // form ID
var EW_PAGE_ID = feedback_grid.PageID; // for backward compatibility

// extend page with ValidateForm function
feedback_grid.ValidateForm = function(fobj) {
	ew_PostAutoSuggest(fobj);
	if (!this.ValidateRequired)
		return true; // ignore validation
	if (fobj.a_confirm && fobj.a_confirm.value == "F")
		return true;
	var i, elm, aelm, infix;
	var rowcnt = (fobj.key_count) ? Number(fobj.key_count.value) : 1;
	var addcnt = 0;
	for (i=0; i<rowcnt; i++) {
		infix = (fobj.key_count) ? String(i+1) : "";
		var chkthisrow = true;
		if (fobj.a_list && fobj.a_list.value == "gridinsert")
			chkthisrow = !(this.EmptyRow(fobj, infix));
		else
			chkthisrow = true;
		if (chkthisrow) {
			addcnt += 1;
		elm = fobj.elements["x" + infix + "_status"];
		if (elm && !ew_HasValue(elm))
			return ew_OnError(this, elm, ewLanguage.Phrase("EnterRequiredField") + " - <?php echo ew_JsEncode2($feedback->status->FldCaption()) ?>");
		elm = fobj.elements["x" + infix + "_comment_admin"];
		if (elm && !ew_HasValue(elm))
			return ew_OnError(this, elm, ewLanguage.Phrase("EnterRequiredField") + " - <?php echo ew_JsEncode2($feedback->comment_admin->FldCaption()) ?>");

		// Set up row object
		var row = {};
		row["index"] = infix;
		for (var j = 0; j < fobj.elements.length; j++) {
			var el = fobj.elements[j];
			var len = infix.length + 2;
			if (el.name.substr(0, len) == "x" + infix + "_") {
				var elname = "x_" + el.name.substr(len);
				if (ewLang.isObject(row[elname])) { // already exists
					if (ewLang.isArray(row[elname])) {
						row[elname][row[elname].length] = el; // add to array
					} else {
						row[elname] = [row[elname], el]; // convert to array
					}
				} else {
					row[elname] = el;
				}
			}
		}
		fobj.row = row;

		// Call Form Custom Validate event
		if (!this.Form_CustomValidate(fobj)) return false;
		} // End Grid Add checking
	}
	return true;
}

// Extend page with empty row check
feedback_grid.EmptyRow = function(fobj, infix) {
	if (ew_ValueChanged(fobj, infix, "name", false)) return false;
	if (ew_ValueChanged(fobj, infix, "zemail", false)) return false;
	if (ew_ValueChanged(fobj, infix, "notel", false)) return false;
	if (ew_ValueChanged(fobj, infix, "feedback_1", false)) return false;
	if (ew_ValueChanged(fobj, infix, "status", false)) return false;
	if (ew_ValueChanged(fobj, infix, "comment_admin", false)) return false;
	return true;
}

// extend page with Form_CustomValidate function
feedback_grid.Form_CustomValidate =  
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }
<?php if (EW_CLIENT_VALIDATE) { ?>
feedback_grid.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
feedback_grid.ValidateRequired = false; // no JavaScript validation
<?php } ?>

//-->
</script>
<link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-win2k-cold-1.css" title="win2k-1">
<script type="text/javascript" src="calendar/calendar.js"></script>
<script type="text/javascript" src="calendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="calendar/calendar-setup.js"></script>
<?php } ?>
<?php
if ($feedback->CurrentAction == "gridadd") {
	if ($feedback->CurrentMode == "copy") {
		$bSelectLimit = EW_SELECT_LIMIT;
		if ($bSelectLimit) {
			$feedback_grid->TotalRecs = $feedback->SelectRecordCount();
			$feedback_grid->Recordset = $feedback_grid->LoadRecordset($feedback_grid->StartRec-1, $feedback_grid->DisplayRecs);
		} else {
			if ($feedback_grid->Recordset = $feedback_grid->LoadRecordset())
				$feedback_grid->TotalRecs = $feedback_grid->Recordset->RecordCount();
		}
		$feedback_grid->StartRec = 1;
		$feedback_grid->DisplayRecs = $feedback_grid->TotalRecs;
	} else {
		$feedback->CurrentFilter = "0=1";
		$feedback_grid->StartRec = 1;
		$feedback_grid->DisplayRecs = $feedback->GridAddRowCount;
	}
	$feedback_grid->TotalRecs = $feedback_grid->DisplayRecs;
	$feedback_grid->StopRec = $feedback_grid->DisplayRecs;
} else {
	$bSelectLimit = EW_SELECT_LIMIT;
	if ($bSelectLimit) {
		$feedback_grid->TotalRecs = $feedback->SelectRecordCount();
	} else {
		if ($feedback_grid->Recordset = $feedback_grid->LoadRecordset())
			$feedback_grid->TotalRecs = $feedback_grid->Recordset->RecordCount();
	}
	$feedback_grid->StartRec = 1;
	$feedback_grid->DisplayRecs = $feedback_grid->TotalRecs; // Display all records
	if ($bSelectLimit)
		$feedback_grid->Recordset = $feedback_grid->LoadRecordset($feedback_grid->StartRec-1, $feedback_grid->DisplayRecs);
}
?>
<p class="phpmaker ewTitle" style="white-space: nowrap;"><?php if ($feedback->CurrentMode == "add" || $feedback->CurrentMode == "copy") { ?><?php echo $Language->Phrase("Add") ?><?php } elseif ($feedback->CurrentMode == "edit") { ?><?php echo $Language->Phrase("Edit") ?><?php } ?>&nbsp;<?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $feedback->TableCaption() ?></p>
</p>
<?php $feedback_grid->ShowPageHeader(); ?>
<?php
$feedback_grid->ShowMessage();
?>
<br>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div id="gmp_feedback" class="ewGridMiddlePanel">
<table cellspacing="0" data-rowhighlightclass="ewTableHighlightRow" data-rowselectclass="ewTableSelectRow" data-roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
<?php echo $feedback->TableCustomInnerHtml ?>
<thead><!-- Table header -->
	<tr class="ewTableHeader">
<?php

// Render list options
$feedback_grid->RenderListOptions();

// Render list options (header, left)
$feedback_grid->ListOptions->Render("header", "left");
?>
<?php if ($feedback->name->Visible) { // name ?>
	<?php if ($feedback->SortUrl($feedback->name) == "") { ?>
		<td><?php echo $feedback->name->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->name->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->name->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->name->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->zemail->Visible) { // email ?>
	<?php if ($feedback->SortUrl($feedback->zemail) == "") { ?>
		<td><?php echo $feedback->zemail->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->zemail->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->zemail->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->zemail->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->notel->Visible) { // notel ?>
	<?php if ($feedback->SortUrl($feedback->notel) == "") { ?>
		<td><?php echo $feedback->notel->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->notel->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->notel->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->notel->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->feedback_1->Visible) { // feedback ?>
	<?php if ($feedback->SortUrl($feedback->feedback_1) == "") { ?>
		<td style="white-space: nowrap;"><?php echo $feedback->feedback_1->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn" style="white-space: nowrap;"><thead><tr><td><?php echo $feedback->feedback_1->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->feedback_1->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->feedback_1->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->status->Visible) { // status ?>
	<?php if ($feedback->SortUrl($feedback->status) == "") { ?>
		<td><?php echo $feedback->status->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->status->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->status->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->status->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->comment_admin->Visible) { // comment_admin ?>
	<?php if ($feedback->SortUrl($feedback->comment_admin) == "") { ?>
		<td style="white-space: nowrap;"><?php echo $feedback->comment_admin->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn" style="white-space: nowrap;"><thead><tr><td><?php echo $feedback->comment_admin->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->comment_admin->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->comment_admin->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->created_date->Visible) { // created_date ?>
	<?php if ($feedback->SortUrl($feedback->created_date) == "") { ?>
		<td><?php echo $feedback->created_date->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->created_date->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->created_date->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->created_date->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php if ($feedback->modified_date->Visible) { // modified_date ?>
	<?php if ($feedback->SortUrl($feedback->modified_date) == "") { ?>
		<td><?php echo $feedback->modified_date->FldCaption() ?></td>
	<?php } else { ?>
		<td><div>
			<table cellspacing="0" class="ewTableHeaderBtn"><thead><tr><td><?php echo $feedback->modified_date->FldCaption() ?></td><td style="width: 10px;"><?php if ($feedback->modified_date->getSort() == "ASC") { ?><img src="phpimages/sortup.gif" width="10" height="9" border="0"><?php } elseif ($feedback->modified_date->getSort() == "DESC") { ?><img src="phpimages/sortdown.gif" width="10" height="9" border="0"><?php } ?></td></tr></thead></table>
		</div></td>		
	<?php } ?>
<?php } ?>		
<?php

// Render list options (header, right)
$feedback_grid->ListOptions->Render("header", "right");
?>
	</tr>
</thead>
<?php
$feedback_grid->StartRec = 1;
$feedback_grid->StopRec = $feedback_grid->TotalRecs; // Show all records

// Restore number of post back records
if ($objForm) {
	$objForm->Index = 0;
	if ($objForm->HasValue("key_count") && ($feedback->CurrentAction == "gridadd" || $feedback->CurrentAction == "gridedit" || $feedback->CurrentAction == "F")) {
		$feedback_grid->KeyCount = $objForm->GetValue("key_count");
		$feedback_grid->StopRec = $feedback_grid->KeyCount;
	}
}
$feedback_grid->RecCnt = $feedback_grid->StartRec - 1;
if ($feedback_grid->Recordset && !$feedback_grid->Recordset->EOF) {
	$feedback_grid->Recordset->MoveFirst();
	if (!$bSelectLimit && $feedback_grid->StartRec > 1)
		$feedback_grid->Recordset->Move($feedback_grid->StartRec - 1);
} elseif (!$feedback->AllowAddDeleteRow && $feedback_grid->StopRec == 0) {
	$feedback_grid->StopRec = $feedback->GridAddRowCount;
}

// Initialize aggregate
$feedback->RowType = EW_ROWTYPE_AGGREGATEINIT;
$feedback->ResetAttrs();
$feedback_grid->RenderRow();
$feedback_grid->RowCnt = 0;
if ($feedback->CurrentAction == "gridadd")
	$feedback_grid->RowIndex = 0;
if ($feedback->CurrentAction == "gridedit")
	$feedback_grid->RowIndex = 0;
while ($feedback_grid->RecCnt < $feedback_grid->StopRec) {
	$feedback_grid->RecCnt++;
	if (intval($feedback_grid->RecCnt) >= intval($feedback_grid->StartRec)) {
		$feedback_grid->RowCnt++;
		if ($feedback->CurrentAction == "gridadd" || $feedback->CurrentAction == "gridedit" || $feedback->CurrentAction == "F")
			$feedback_grid->RowIndex++;

		// Set up key count
		$feedback_grid->KeyCount = $feedback_grid->RowIndex;

		// Init row class and style
		$feedback->ResetAttrs();
		$feedback->CssClass = "";
		if ($feedback->CurrentAction == "gridadd") {
			if ($feedback->CurrentMode == "copy") {
				$feedback_grid->LoadRowValues($feedback_grid->Recordset); // Load row values
				$feedback_grid->SetRecordKey($feedback_grid->RowOldKey, $feedback_grid->Recordset); // Set old record key
			} else {
				$feedback_grid->LoadDefaultValues(); // Load default values
				$feedback_grid->RowOldKey = ""; // Clear old key value
			}
		} elseif ($feedback->CurrentAction == "gridedit") {
			$feedback_grid->LoadRowValues($feedback_grid->Recordset); // Load row values
		}
		$feedback->RowType = EW_ROWTYPE_VIEW; // Render view
		if ($feedback->CurrentAction == "gridadd") // Grid add
			$feedback->RowType = EW_ROWTYPE_ADD; // Render add
		if ($feedback->CurrentAction == "gridadd" && $feedback->EventCancelled) // Insert failed
			$feedback_grid->RestoreCurrentRowFormValues($feedback_grid->RowIndex); // Restore form values
		if ($feedback->CurrentAction == "gridedit") { // Grid edit
			if ($feedback->EventCancelled) {
				$feedback_grid->RestoreCurrentRowFormValues($feedback_grid->RowIndex); // Restore form values
			}
			if ($feedback_grid->RowAction == "insert")
				$feedback->RowType = EW_ROWTYPE_ADD; // Render add
			else
				$feedback->RowType = EW_ROWTYPE_EDIT; // Render edit
		}
		if ($feedback->CurrentAction == "gridedit" && ($feedback->RowType == EW_ROWTYPE_EDIT || $feedback->RowType == EW_ROWTYPE_ADD) && $feedback->EventCancelled) // Update failed
			$feedback_grid->RestoreCurrentRowFormValues($feedback_grid->RowIndex); // Restore form values
		if ($feedback->RowType == EW_ROWTYPE_EDIT) // Edit row
			$feedback_grid->EditRowCnt++;
		if ($feedback->CurrentAction == "F") // Confirm row
			$feedback_grid->RestoreCurrentRowFormValues($feedback_grid->RowIndex); // Restore form values
		if ($feedback->RowType == EW_ROWTYPE_ADD || $feedback->RowType == EW_ROWTYPE_EDIT) { // Add / Edit row
			if ($feedback->CurrentAction == "edit") {
				$feedback->RowAttrs = array();
				$feedback->CssClass = "ewTableEditRow";
			} else {
				$feedback->RowAttrs = array();
			}
			if (!empty($feedback_grid->RowIndex))
				$feedback->RowAttrs = array_merge($feedback->RowAttrs, array('data-rowindex'=>$feedback_grid->RowIndex, 'id'=>'r' . $feedback_grid->RowIndex . '_feedback'));
		} else {
			$feedback->RowAttrs = array();
		}

		// Render row
		$feedback_grid->RenderRow();

		// Render list options
		$feedback_grid->RenderListOptions();

		// Skip delete row / empty row for confirm page
		if ($feedback_grid->RowAction <> "delete" && $feedback_grid->RowAction <> "insertdelete" && !($feedback_grid->RowAction == "insert" && $feedback->CurrentAction == "F" && $feedback_grid->EmptyRow())) {
?>
	<tr<?php echo $feedback->RowAttributes() ?>>
<?php

// Render list options (body, left)
$feedback_grid->ListOptions->Render("body", "left");
?>
	<?php if ($feedback->name->Visible) { // name ?>
		<td<?php echo $feedback->name->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_name" id="x<?php echo $feedback_grid->RowIndex ?>_name" size="70" maxlength="255" value="<?php echo $feedback->name->EditValue ?>"<?php echo $feedback->name->EditAttributes() ?>>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_name" id="o<?php echo $feedback_grid->RowIndex ?>_name" value="<?php echo ew_HtmlEncode($feedback->name->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<div<?php echo $feedback->name->ViewAttributes() ?>><?php echo $feedback->name->EditValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_name" id="x<?php echo $feedback_grid->RowIndex ?>_name" value="<?php echo ew_HtmlEncode($feedback->name->CurrentValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->name->ViewAttributes() ?>><?php echo $feedback->name->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_name" id="x<?php echo $feedback_grid->RowIndex ?>_name" value="<?php echo ew_HtmlEncode($feedback->name->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_name" id="o<?php echo $feedback_grid->RowIndex ?>_name" value="<?php echo ew_HtmlEncode($feedback->name->OldValue) ?>">
<?php } ?>
<a name="<?php echo $feedback_grid->PageObjName . "_row_" . $feedback_grid->RowCnt ?>" id="<?php echo $feedback_grid->PageObjName . "_row_" . $feedback_grid->RowCnt ?>"></a>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_id" id="o<?php echo $feedback_grid->RowIndex ?>_id" value="<?php echo ew_HtmlEncode($feedback->id->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { ?>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_id" id="x<?php echo $feedback_grid->RowIndex ?>_id" value="<?php echo ew_HtmlEncode($feedback->id->CurrentValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->zemail->Visible) { // email ?>
		<td<?php echo $feedback->zemail->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_zemail" id="x<?php echo $feedback_grid->RowIndex ?>_zemail" size="70" maxlength="255" value="<?php echo $feedback->zemail->EditValue ?>"<?php echo $feedback->zemail->EditAttributes() ?>>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_zemail" id="o<?php echo $feedback_grid->RowIndex ?>_zemail" value="<?php echo ew_HtmlEncode($feedback->zemail->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<div<?php echo $feedback->zemail->ViewAttributes() ?>><?php echo $feedback->zemail->EditValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_zemail" id="x<?php echo $feedback_grid->RowIndex ?>_zemail" value="<?php echo ew_HtmlEncode($feedback->zemail->CurrentValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->zemail->ViewAttributes() ?>><?php echo $feedback->zemail->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_zemail" id="x<?php echo $feedback_grid->RowIndex ?>_zemail" value="<?php echo ew_HtmlEncode($feedback->zemail->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_zemail" id="o<?php echo $feedback_grid->RowIndex ?>_zemail" value="<?php echo ew_HtmlEncode($feedback->zemail->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->notel->Visible) { // notel ?>
		<td<?php echo $feedback->notel->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_notel" id="x<?php echo $feedback_grid->RowIndex ?>_notel" size="70" maxlength="255" value="<?php echo $feedback->notel->EditValue ?>"<?php echo $feedback->notel->EditAttributes() ?>>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_notel" id="o<?php echo $feedback_grid->RowIndex ?>_notel" value="<?php echo ew_HtmlEncode($feedback->notel->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<div<?php echo $feedback->notel->ViewAttributes() ?>><?php echo $feedback->notel->EditValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_notel" id="x<?php echo $feedback_grid->RowIndex ?>_notel" value="<?php echo ew_HtmlEncode($feedback->notel->CurrentValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->notel->ViewAttributes() ?>><?php echo $feedback->notel->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_notel" id="x<?php echo $feedback_grid->RowIndex ?>_notel" value="<?php echo ew_HtmlEncode($feedback->notel->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_notel" id="o<?php echo $feedback_grid->RowIndex ?>_notel" value="<?php echo ew_HtmlEncode($feedback->notel->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->feedback_1->Visible) { // feedback ?>
		<td<?php echo $feedback->feedback_1->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<textarea name="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" cols="70" rows="4"<?php echo $feedback->feedback_1->EditAttributes() ?>><?php echo $feedback->feedback_1->EditValue ?></textarea>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="o<?php echo $feedback_grid->RowIndex ?>_feedback_1" value="<?php echo ew_HtmlEncode($feedback->feedback_1->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<div<?php echo $feedback->feedback_1->ViewAttributes() ?>><?php echo $feedback->feedback_1->EditValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" value="<?php echo ew_HtmlEncode($feedback->feedback_1->CurrentValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->feedback_1->ViewAttributes() ?>><?php echo $feedback->feedback_1->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" value="<?php echo ew_HtmlEncode($feedback->feedback_1->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="o<?php echo $feedback_grid->RowIndex ?>_feedback_1" value="<?php echo ew_HtmlEncode($feedback->feedback_1->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->status->Visible) { // status ?>
		<td<?php echo $feedback->status->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<select id="x<?php echo $feedback_grid->RowIndex ?>_status" name="x<?php echo $feedback_grid->RowIndex ?>_status"<?php echo $feedback->status->EditAttributes() ?>>
<?php
if (is_array($feedback->status->EditValue)) {
	$arwrk = $feedback->status->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($feedback->status->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $feedback->status->OldValue = "";
?>
</select>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_status" id="o<?php echo $feedback_grid->RowIndex ?>_status" value="<?php echo ew_HtmlEncode($feedback->status->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<select id="x<?php echo $feedback_grid->RowIndex ?>_status" name="x<?php echo $feedback_grid->RowIndex ?>_status"<?php echo $feedback->status->EditAttributes() ?>>
<?php
if (is_array($feedback->status->EditValue)) {
	$arwrk = $feedback->status->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($feedback->status->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $feedback->status->OldValue = "";
?>
</select>
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->status->ViewAttributes() ?>><?php echo $feedback->status->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_status" id="x<?php echo $feedback_grid->RowIndex ?>_status" value="<?php echo ew_HtmlEncode($feedback->status->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_status" id="o<?php echo $feedback_grid->RowIndex ?>_status" value="<?php echo ew_HtmlEncode($feedback->status->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->comment_admin->Visible) { // comment_admin ?>
		<td<?php echo $feedback->comment_admin->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<textarea name="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" cols="50" rows="4"<?php echo $feedback->comment_admin->EditAttributes() ?>><?php echo $feedback->comment_admin->EditValue ?></textarea>
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="o<?php echo $feedback_grid->RowIndex ?>_comment_admin" value="<?php echo ew_HtmlEncode($feedback->comment_admin->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<textarea name="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" cols="50" rows="4"<?php echo $feedback->comment_admin->EditAttributes() ?>><?php echo $feedback->comment_admin->EditValue ?></textarea>
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->comment_admin->ViewAttributes() ?>><?php echo $feedback->comment_admin->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" value="<?php echo ew_HtmlEncode($feedback->comment_admin->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="o<?php echo $feedback_grid->RowIndex ?>_comment_admin" value="<?php echo ew_HtmlEncode($feedback->comment_admin->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->created_date->Visible) { // created_date ?>
		<td<?php echo $feedback->created_date->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="hidden" name="fo<?php echo $feedback_grid->RowIndex ?>_created_date" id="fo<?php echo $feedback_grid->RowIndex ?>_created_date" value="<?php echo ew_HtmlEncode(ew_FormatDateTime($feedback->created_date->OldValue, 11)) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_created_date" id="o<?php echo $feedback_grid->RowIndex ?>_created_date" value="<?php echo ew_HtmlEncode($feedback->created_date->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->created_date->ViewAttributes() ?>><?php echo $feedback->created_date->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_created_date" id="x<?php echo $feedback_grid->RowIndex ?>_created_date" value="<?php echo ew_HtmlEncode($feedback->created_date->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_created_date" id="o<?php echo $feedback_grid->RowIndex ?>_created_date" value="<?php echo ew_HtmlEncode($feedback->created_date->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->modified_date->Visible) { // modified_date ?>
		<td<?php echo $feedback->modified_date->CellAttributes() ?>>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="hidden" name="fo<?php echo $feedback_grid->RowIndex ?>_modified_date" id="fo<?php echo $feedback_grid->RowIndex ?>_modified_date" value="<?php echo ew_HtmlEncode(ew_FormatDateTime($feedback->modified_date->OldValue, 11)) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_modified_date" id="o<?php echo $feedback_grid->RowIndex ?>_modified_date" value="<?php echo ew_HtmlEncode($feedback->modified_date->OldValue) ?>">
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<div<?php echo $feedback->modified_date->ViewAttributes() ?>><?php echo $feedback->modified_date->ListViewValue() ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_modified_date" id="x<?php echo $feedback_grid->RowIndex ?>_modified_date" value="<?php echo ew_HtmlEncode($feedback->modified_date->CurrentValue) ?>">
<input type="hidden" name="o<?php echo $feedback_grid->RowIndex ?>_modified_date" id="o<?php echo $feedback_grid->RowIndex ?>_modified_date" value="<?php echo ew_HtmlEncode($feedback->modified_date->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$feedback_grid->ListOptions->Render("body", "right");
?>
	</tr>
<?php if ($feedback->RowType == EW_ROWTYPE_ADD) { ?>
<?php } ?>
<?php if ($feedback->RowType == EW_ROWTYPE_EDIT) { ?>
<?php } ?>
<?php
	}
	} // End delete row checking
	if ($feedback->CurrentAction <> "gridadd" || $feedback->CurrentMode == "copy")
		if (!$feedback_grid->Recordset->EOF) $feedback_grid->Recordset->MoveNext();
}
?>
<?php
	if ($feedback->CurrentMode == "add" || $feedback->CurrentMode == "copy" || $feedback->CurrentMode == "edit") {
		$feedback_grid->RowIndex = '$rowindex$';
		$feedback_grid->LoadDefaultValues();

		// Set row properties
		$feedback->ResetAttrs();
		$feedback->RowAttrs = array();
		if (!empty($feedback_grid->RowIndex))
			$feedback->RowAttrs = array_merge($feedback->RowAttrs, array('data-rowindex'=>$feedback_grid->RowIndex, 'id'=>'r' . $feedback_grid->RowIndex . '_feedback'));
		$feedback->RowType = EW_ROWTYPE_ADD;

		// Render row
		$feedback_grid->RenderRow();

		// Render list options
		$feedback_grid->RenderListOptions();

		// Add id and class to the template row
		$feedback->RowAttrs["id"] = "r0_feedback";
		ew_AppendClass($feedback->RowAttrs["class"], "ewTemplate");
?>
	<tr<?php echo $feedback->RowAttributes() ?>>
<?php

// Render list options (body, left)
$feedback_grid->ListOptions->Render("body", "left");
?>
	<?php if ($feedback->name->Visible) { // name ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_name" id="x<?php echo $feedback_grid->RowIndex ?>_name" size="70" maxlength="255" value="<?php echo $feedback->name->EditValue ?>"<?php echo $feedback->name->EditAttributes() ?>>
<?php } else { ?>
<div<?php echo $feedback->name->ViewAttributes() ?>><?php echo $feedback->name->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_name" id="x<?php echo $feedback_grid->RowIndex ?>_name" value="<?php echo ew_HtmlEncode($feedback->name->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->zemail->Visible) { // email ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_zemail" id="x<?php echo $feedback_grid->RowIndex ?>_zemail" size="70" maxlength="255" value="<?php echo $feedback->zemail->EditValue ?>"<?php echo $feedback->zemail->EditAttributes() ?>>
<?php } else { ?>
<div<?php echo $feedback->zemail->ViewAttributes() ?>><?php echo $feedback->zemail->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_zemail" id="x<?php echo $feedback_grid->RowIndex ?>_zemail" value="<?php echo ew_HtmlEncode($feedback->zemail->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->notel->Visible) { // notel ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<input type="text" name="x<?php echo $feedback_grid->RowIndex ?>_notel" id="x<?php echo $feedback_grid->RowIndex ?>_notel" size="70" maxlength="255" value="<?php echo $feedback->notel->EditValue ?>"<?php echo $feedback->notel->EditAttributes() ?>>
<?php } else { ?>
<div<?php echo $feedback->notel->ViewAttributes() ?>><?php echo $feedback->notel->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_notel" id="x<?php echo $feedback_grid->RowIndex ?>_notel" value="<?php echo ew_HtmlEncode($feedback->notel->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->feedback_1->Visible) { // feedback ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<textarea name="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" cols="70" rows="4"<?php echo $feedback->feedback_1->EditAttributes() ?>><?php echo $feedback->feedback_1->EditValue ?></textarea>
<?php } else { ?>
<div<?php echo $feedback->feedback_1->ViewAttributes() ?>><?php echo $feedback->feedback_1->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" id="x<?php echo $feedback_grid->RowIndex ?>_feedback_1" value="<?php echo ew_HtmlEncode($feedback->feedback_1->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->status->Visible) { // status ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<select id="x<?php echo $feedback_grid->RowIndex ?>_status" name="x<?php echo $feedback_grid->RowIndex ?>_status"<?php echo $feedback->status->EditAttributes() ?>>
<?php
if (is_array($feedback->status->EditValue)) {
	$arwrk = $feedback->status->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($feedback->status->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $feedback->status->OldValue = "";
?>
</select>
<?php } else { ?>
<div<?php echo $feedback->status->ViewAttributes() ?>><?php echo $feedback->status->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_status" id="x<?php echo $feedback_grid->RowIndex ?>_status" value="<?php echo ew_HtmlEncode($feedback->status->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->comment_admin->Visible) { // comment_admin ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<textarea name="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" cols="50" rows="4"<?php echo $feedback->comment_admin->EditAttributes() ?>><?php echo $feedback->comment_admin->EditValue ?></textarea>
<?php } else { ?>
<div<?php echo $feedback->comment_admin->ViewAttributes() ?>><?php echo $feedback->comment_admin->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" id="x<?php echo $feedback_grid->RowIndex ?>_comment_admin" value="<?php echo ew_HtmlEncode($feedback->comment_admin->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->created_date->Visible) { // created_date ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<?php } else { ?>
<div<?php echo $feedback->created_date->ViewAttributes() ?>><?php echo $feedback->created_date->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_created_date" id="x<?php echo $feedback_grid->RowIndex ?>_created_date" value="<?php echo ew_HtmlEncode($feedback->created_date->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($feedback->modified_date->Visible) { // modified_date ?>
		<td>
<?php if ($feedback->CurrentAction <> "F") { ?>
<?php } else { ?>
<div<?php echo $feedback->modified_date->ViewAttributes() ?>><?php echo $feedback->modified_date->ViewValue ?></div>
<input type="hidden" name="x<?php echo $feedback_grid->RowIndex ?>_modified_date" id="x<?php echo $feedback_grid->RowIndex ?>_modified_date" value="<?php echo ew_HtmlEncode($feedback->modified_date->FormValue) ?>">
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$feedback_grid->ListOptions->Render("body", "right");
?>
	</tr>
<?php
}
?>
</tbody>
</table>
<?php if ($feedback->CurrentMode == "add" || $feedback->CurrentMode == "copy") { ?>
<input type="hidden" name="a_list" id="a_list" value="gridinsert">
<input type="hidden" name="key_count" id="key_count" value="<?php echo $feedback_grid->KeyCount ?>">
<?php echo $feedback_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($feedback->CurrentMode == "edit") { ?>
<input type="hidden" name="a_list" id="a_list" value="gridupdate">
<input type="hidden" name="key_count" id="key_count" value="<?php echo $feedback_grid->KeyCount ?>">
<?php echo $feedback_grid->MultiSelectKey ?>
<?php } ?>
<input type="hidden" name="detailpage" id="detailpage" value="feedback_grid">
</div>
<?php

// Close recordset
if ($feedback_grid->Recordset)
	$feedback_grid->Recordset->Close();
?>
<?php if (($feedback->CurrentMode == "add" || $feedback->CurrentMode == "copy" || $feedback->CurrentMode == "edit") && $feedback->CurrentAction != "F") { // add/copy/edit mode ?>
<div class="ewGridLowerPanel">
</div>
<?php } ?>
</td></tr></table>
<?php if ($feedback->Export == "" && $feedback->CurrentAction == "") { ?>
<?php } ?>
<?php
$feedback_grid->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<?php
$feedback_grid->Page_Terminate();
$Page =& $MasterPage;
?>
